<template>
    <div>
        <div class="title" ></div>
        <div class="student">
            <div style="color:rgba(0, 0, 0, 0.45);display:inline-block">考生:</div> 
            <div class="change">{{form.province}}</div>  
            <div class="change">{{form.batches}}</div>  
            <div class="change">{{form.subject}}</div>  
            <div class="change">{{form.score}}</div>  
            <!-- <div class="change" style="color: rgba(51, 170, 255, 1);cursor:pointer" @click="change()">修改</div> -->
        </div>
    </div>          
</template>

<script>
export default {
    props:{
        subtitle:String,
    },
    data(){
        return{
            form:{
                batches:"",
                subject:"",
                score:"",
                province:"",
                year:"",
            },
            getData:{},
        }
    },
    methods:{
        change(){
            console.log('点击修改')
            this.$router.push('/informationfilling')
        },
        transform(){
            this.getData = JSON.parse(sessionStorage.form)
            if(this.getData.batch==0){
                this.form.batches="本科一批"
            }
            else if(this.getData.batch==1){
                this.form.batches="本科二批"
            }
            else if(this.getData.batch==2){
                this.form.batches="新高考"
            }
            if(this.getData.subject==0){
                this.form.subject="文科"
            }
            else if(this.getData.subject==1){
                this.form.subject="理科"
            }else if(this.getData.subject ==2){
				this.form.subject="新高考"
			}
            this.form.score=this.getData.score
            this.form.year=this.getData.year
            let province = JSON.parse(sessionStorage.province)
            let provinceId = this.getData.provinceId
            for(let i=0;i<=province.length-1;i++){
                if(provinceId==province[i].id){
                    this.form.province=province[i].provinceName
                }
            }
            // console.log(this.form);
        },
    },
    mounted(){
        this.transform()
        sessionStorage.setItem('trans_form',JSON.stringify(this.form))
    },
    
}
</script>

<style scoped>
.title{
    width: 100%;
	height: 160px;
    font-size: 40px;
    font-family: Noto Sans SC;
    color: #000000;
    font-weight: 600;
    display: flex;
    flex-direction: column;
    align-items: center;
	margin-left: 50px;
    justify-content: center;
}
.student{
    text-align: left;
    font-size: 28px;
    font-family: Noto Sans SC;
    font-weight: 400;
    line-height: 48px;
    /* width: 550px; */
    margin-left: 88px;
}
.change{
    /* float: right; */
    /* color: rgba(51, 170, 255, 1); */
    margin-left: 32px;
    display: inline-block;
}
</style>